package com.yupi.yuoj.utils;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.boot.autoconfigure.amqp.RabbitTemplateConfigurer;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class Mqproducter {
    @Resource
    private RabbitTemplate rabbitTemplate;

    public  void sendMessage(String exchange,String keyvalue,String mess){
        rabbitTemplate.convertAndSend(exchange,keyvalue,mess);
    }
}
